const { defineConfig } = require('@vue/cli-service')
const port = process.env.port || process.env.npm_config_port || 9528
module.exports = defineConfig({
  transpileDependencies: true,
  publicPath: './',
  outputDir: 'dist',
  assetsDir: 'static',
  lintOnSave: process.env.NODE_ENV === 'development',
  productionSourceMap: false,
  devServer: {
    port: port,
    open: true,
    client: {
      overlay: false
    },
    proxy: {
      '/v1_0': {
        target: 'https://geek.itheima.net'
      }
    }
  },
  css: {
    loaderOptions: {
      less: {
        lessOptions: {
          // 这里定义不需要加@，使用的时候需要加@
          globalVars: {
            'geek-color': '#FC6627',
            'geek-gray-color': '#F7F8FA'
          }
        }
      }
    }
  }
})
